package com.niiwoo.activity.event.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @Description 借新还旧标的标识(0:正常标的，1:借款还旧需返现标的，2:借新还旧无需返现标的)
 * @Author zq
 * @Date 2018/3/28
 */
@Getter
@AllArgsConstructor
public enum ExchangeProjectEventEnum {

    NORMAL(Byte.valueOf("0"),"正常标的"),
    REFINANCING_YES_RETURN_CASH(Byte.valueOf("1"),"借款还旧需返现标的"),
    REFINANCING_NO_RETURN_CASH(Byte.valueOf("2"),"借新还旧无需返现标的");


    private Byte status;

    private String desc;

    public static ExchangeProjectEventEnum valueOf(Byte status) {
        for (ExchangeProjectEventEnum typeEventEnum : ExchangeProjectEventEnum.values()) {
            if (status.byteValue() == typeEventEnum.getStatus()) {
                return typeEventEnum;
            }
        }
        return null;
    }
}
